_Get Undone Action Items
(22 actions, 22 KB)
0 DataJar > GetValueIntent »
1
2
keyPath
:
My Reminders.taskLists
1 Repeat with Each in
[0 Value
as Dictionary’s Keys
]
2 Get Dictionary Value for
[Repeat Item]
.withDueDate
in
[0 Value]
➔ withDueDate
»
3 If
[2 withDueDate
as Boolean
]
is true
4 Run Shortcut
Filter Reminder Lists
»
Input
:
[Repeat Item]
Workflow
:
{ "workflowIdentifier": "51A51D7D-F81D-496D-9074-3B3D2F68CE9E", "workflowName": "Filter Reminder Lists", "isSelf": false }
5 Add
[4 Shortcut Result]
to Variable
taskListsWithDueDate
6 End If
7 End Repeat with Each ▵
1
8 Repeat with Each in
[taskListsWithDueDate]
9 Date
Specified Date
»
DateActionDate
:
[Shortcut Input
as Date{"Date Style":"Medium","WFISO8601IncludeTime":false,"Time Style":"None"}
]
00:00
10 Find Reminders
ContentItemFilter
:
• All the following are true Due Date <
[9 Date]
List is
[Repeat Item]
Is Completed
11 End Repeat with Each
➔ unsortedActionItems
»
13
19
12 Dictionary
➔ mappingDict
»
14
{ "High": "3", "Medium": "2", "Low": "1", "None": "0" }
13 Repeat with Each in
[11 unsortedActionItems
’s Priority
]
14 Get Dictionary Value for
[Repeat Item]
in
[12 mappingDict]
»
15 Set Name of
[Repeat Index]
to
[14 Dictionary Value]
16 End Repeat with Each »
17 Filter Files
[16 Repeat Results]
»
ContentItemSortProperty
:
Name
ContentItemSortOrder
:
Z to A
18 Repeat with Each in
[17 Files]
19 Get
Item At Index
[Repeat Item]
from List
[11 unsortedActionItems]
20 End Repeat with Each
➔ sortedActionItems
»
21 Stop and Output
[20 sortedActionItems]